﻿<Window x:Class="XmlFlowDocumentSample.Window1"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
	xmlns:converters="clr-namespace:CJC.Wpf.Converters"
    Title="Pretty XML FlowDocument sample">

	<Window.Resources>
		<converters:PrettyXmlConverter x:Key="prettyXmlConverter"/>
		<XmlDataProvider x:Key="xmlSource" Source="Xml/Books.xml" IsAsynchronous="False"/>
	</Window.Resources>

    <Grid>

		<FlowDocumentReader ViewingMode="Scroll" Zoom="300"
							Document="{Binding Source={StaticResource xmlSource}, Path=Document, BindsDirectlyToSource=true, Converter={StaticResource prettyXmlConverter}}">
		</FlowDocumentReader>

    </Grid>

</Window>
